<?php
/**
 *
 * @package    opensocial
 * @subpackage datarequest
 * @author     Daniel Botelho <botelho.daniel@gmail.com>
 */
class OSPersonAppData
{
  private $person;
  
  private $key;
  private $value;
  
  function __construct(OSViewer $person, $key, $value)
  {
    $this->person = $person;
    $this->key = $key;
    $this->value = $value;
  }
  
  public function getPerson() { return $this->person; }
  public function getKey() { return $this->key; }
  public function getValue() { return $this->value; }
  
  public function setPerson(OSViewer $person) { $this->person = $person; }
  public function setKey($key) { $this->key= $key; }
  public function setValue($value) { $this->value = $value; }
  
  public function getAppData()
  {
  	return $this->getPerson()->getVarName().'_data['.$this->getPerson()->getId(true).']["'. $this->getKey() .'"]';
  }
}